<template>
	<el-table
		v-loading="loading"
		element-loading-spinner="el-icon-loading"
		border
		size="mini"
		class="small-size-table"
		:data="[data]"
		style="width: 100%"
		highlight-current-row
		header-align="center"
		:header-cell-style="getRowClass"
	>
		<el-table-column prop="proxyName" align="center" label="会员账号">
			<template slot-scope="scope">
				{{ scope.row.memberName }}
			</template>
		</el-table-column>
		<el-table-column prop="netAmount" align="center" label="本期盈亏">
			<template slot="header" slot-scope="{ column, $index }">
				<span>
					本期盈亏
					<el-tooltip
						class="item"
						effect="dark"
						content="汇总德州+体育+真人+电竞+棋牌+彩票+电子+其他八个项目的盈亏之和"
						placement="top-start"
					>
						<i class="el-icon-question"></i>
					</el-tooltip>
				</span>
			</template>
			<template slot-scope="scope">
				<formItem :scope="scope" :updateData="updateData" />
			</template>
		</el-table-column>
		<el-table-column prop="adjustmentAmount" align="center">
			<template slot="header">
				<span>
					其他资金变动
					<el-tooltip
						class="item"
						effect="dark"
						placement="top-start"
					>
						<span slot="content">
							统计非游戏盈亏类目的资金增减变动
						</span>
						<i class="el-icon-question"></i>
					</el-tooltip>
				</span>
			</template>
			<template slot-scope="scope">
				<formItem :scope="scope" :updateData="updateData" />
			</template>
		</el-table-column>
		<el-table-column
			prop="lastPeriodShouldReceiptPaymentParentAmount"
			align="center"
		>
			<template slot="header">
				<span>
					上期应收/应付上级
					<el-tooltip
						class="item"
						effect="dark"
						placement="top-start"
					>
						<span slot="content">上期账单中的应收/应付上级</span>
						<i class="el-icon-question"></i>
					</el-tooltip>
				</span>
			</template>
			<template slot-scope="scope">
				<formItem :scope="scope" :updateData="updateData" />
			</template>
		</el-table-column>
		<el-table-column align="center">
			<template slot="header">
				<span>
					应收/应付上级
					<el-tooltip
						class="item"
						effect="dark"
						placement="top-start"
					>
						<span slot="content">
							本期盈亏+其他资金变动+上期应收上级-上期应付上级
						</span>
						<i class="el-icon-question"></i>
					</el-tooltip>
				</span>
			</template>
			<template slot-scope="scope">
				{{ aomunt(personShouldReceiptPaymentAmount) }}
			</template>
		</el-table-column>
	</el-table>
</template>

<script>
import formItem from './formItem.vue'
import list from '@/mixins/list'
import mixin from './mixin'
export default {
  components: {
    formItem
  },
  mixins: [list, mixin],
  props: {
    data: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
    }
  },
  computed: {
    personShouldReceiptPaymentAmount() {
      const { netAmount, adjustmentAmount, lastPeriodShouldReceiptPaymentParentAmount } = this.data
      if (!this.checkNums([netAmount, adjustmentAmount, lastPeriodShouldReceiptPaymentParentAmount])) {
        return '/'
      }
      return netAmount + adjustmentAmount + lastPeriodShouldReceiptPaymentParentAmount
    }
  }
}
</script>
